package com.ea.report.controller;

import com.ea.common.result.Result;
import org.springframework.cloud.context.refresh.ContextRefresher;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/system")
public class SystemController {

    @Resource
    ContextRefresher contextRefresher;

    @PostMapping("/refreshConfig")
    Result refreshConfig() {
        contextRefresher.refresh();
        return Result.success(null);
    }
}
